<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!doctype html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>ognl</title>
</head>
<body>
<div>
    <h1>OGNL表达式内置对象</h1>
    <div>
        <%-- https://struts.apache.org/tag-developers/ognl --%>
        <%--
            context map---|
                          |--application
                          |
                          |--session
                          |
                          |--value stack(root)
                          |
                          |--action (the current action)
                          |
                          |--request
                          |
                          |--parameters
                          |
                          |--attr (searches page, request, session, then application scopes)

            application
            session
            struts
            request
            parameters
            servletRequest
            servletResponse

            %{} 解析表达式
            #{'username':'trillian'} 等效于map put("username","trillian")

            struts-tags
            获取property，特殊命名的变量要以#号开头，
            [ parameters | application | session | struts | request | servletRequest | servletResponse ]
            如果标签属性不支持动态表达式，可以使用%{ }
            key-value形式变量：#{'foo':'foovalue', 'bar':'barvalue'}
            https://struts.apache.org/tag-developers/tag-reference.html
        --%>
        <s:property value="#request.foo"/>
    </div>
</div>
</body>
</html>
